﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Core.Base;

namespace Frame.Lib.Core.Log.Login
{
    public class LogLoginDAL : BaseDAL
    {
        public LogLoginDAL()
        { }

        internal void Delete()
        {
            string sql = "delete from " + STableName.LogLogin;
            dbOper.RunSql(sql);
        }

        internal void Delete(string startTime, string endTime)
        {
            string condition = " 1=1 ";

            if (!string.IsNullOrEmpty(startTime))
            {
                condition += " and InputTime >= @p0";
            }
            if (!string.IsNullOrEmpty(endTime))
            {
                condition += " and InputTime <= @p1";
            }

            string sql = "delete from "+ STableName.LogLogin + " where " + condition;
            dbOper.RunSql(sql, startTime, endTime);
        }
    }




}
